<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>后台管理面板</title>
  <!-- 告诉浏览器该页面是自适应布局 -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
   {include file="index/top" /}
</head>
<body class="hold-transition skin-blue sidebar-mini">	
<div class="wrapper">
    <div class="content-wrapper" style="margin-left: 0 !important;">
        <!--页眉-->
        <section class="content-header">
          <h1>{$info?'修改':'添加'}管理员</h1>
        </section>
        <!--内容开始-->
        <section class="content">
            <div class="search">
            	<form class="form-inline" action="{:url('Auth/adminList')}">
                 <input class="btn btn-flat btn-primary m_10_l_0" onclick="location.href='{:url('Auth/adminList')}'" type="button" value="显示全部">
                 <a class="btn btn-flat btn-success m_10 f_r" onclick="javascript :history.back(-1)"><i class="fa fa-undo m-r-10"></i>返 回</a>  
            	</form> 
            </div>
            <!--数据表开始-->
            <div class="row">
                <div class="col-xs-12">
                	<div class="box box-body">
                		{if $info}
                		<form method="post" action="{:url('Auth/adminEdit')}">
                			<input type="hidden" name="id" value="{$info.id}"/>
                		{else /}
                		<form method="post" action="{:url('Auth/adminAdd')}">
                		{/if}
		                	<!---->
		                	<div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">用户组</label>
				                  <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
				                    <select name="group_id" class="form-control">
						                    <option value="">请选择用户组</option>
						                    {volist name="authGroup" id="vo"}
						                    {if $info}
						                    	<option {if $info['group_id']==$vo.id}selected{/if} value="{$vo.id}">{$vo.title}</option>
						                    {else /}
						                    	<option value="{$vo.id}">{$vo.title}</option>
						                    {/if}
						                    {/volist}
						                </select>
				                  </div>
				                  <div class="col-xs-1 col-sm-4 col-md-6 col-lg-6 dd_ts"> *</div>
				                </div>
			                </div>	
		                	<!---->
		                	<div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">用户名</label>
				                  <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
				                    <input type="text" name="username" class="form-control" placeholder="请输入登录用户名" value="{$info.username}">
				                  </div>
				                  <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">* 用户名在4到25个字符之间。</div>
				                </div>
			                </div>
			                <!---->
		                	<div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">密 码</label>
				                  <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
				                    <input type="password" name="password" class="form-control" placeholder="请输入登录密码">
				                  </div>
				                  <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">* 密码在6到25个字符之间。</div>
				                </div>
			                </div>
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">头像</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="image" class="form-control" placeholder="请点击按钮上传或手动输入地址" value="{$info.image}">
                                    </div>
                                    <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                        <!--上传图片-->
                                        <!--用来存放item-->
                                        <div id="fileList_image" class="uploader-list">
                                        </div>
                                        <div id="filePicker_image"><i class="fa fa-upload m-r-10"></i>选择图片</div>
                                        <img class="image_preview" src="{$info['image']?$info['image']:'/static/admin/images/nopic.png'}" id="image_preview">
                                        <!--上传图片-->
                                    </div>
                                </div>
                            </div>
			                <!---->
			                <div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">昵 称</label>
				                  <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
				                    <input type="text" name="nickname" class="form-control" placeholder="请输入昵称" value="{$info.nickname?$info.nickname:''}">
				                  </div>
				                  <div class="col-xs-1 col-sm-4 col-md-6 col-lg-6 dd_ts">* </div>
				                </div>
			                </div>
			                <!---->
			                <div class="row dd_input_group">
			                	<div class="form-group">
				                  <div class="col-xs-12 col-sm-8 col-md-6 col-lg-5 text-center">
				                    	<button type="submit" class="btn btn-flat btn-primary ">提 交</button> 
				                    	<button type="button" class="btn btn-flat btn-default" onclick="javascript :history.back(-1)">返 回</button>
				                  </div>
		
				                </div>
			                </div>
                		</form>
                 </div>
                  <!-- /.box -->
                </div>
              </div>
            <!--数据表结束-->
        </section>
        <!-- right col -->
      </div>
      <!-- /.row (main row) -->

    </section>
        <!--内容结束-->
    </div>
</div>
<script type="text/javascript" src="/static/plugins/webuploader-0.1.5/webuploader.js"></script>
{include file="index/webuploader" /}
<script>
    webupload('fileList_image','filePicker_image','image_preview','image');
</script>
{include file="index/bottom" /} 
</body>
</html>    